import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main1(String[] args) {
        int count = 0;
        for (int i = 3; i <= 100; i++) {
            boolean flag = true;
            for (int j = 2; j < i; j++) {
                if(i % j == 0){
                    flag = false;
                    break;
                }
            }
            if(flag){
                count++;
                System.out.print(i + " ");
                if(count % 5 ==0){
                    System.out.println();
                }
            }
        }

        for (int i = 1; i < 21; i++) {
            for (int j = 1; j < 34; j++) {
                for (int k = 3; k < 100; k+=3) {
                    int money = i * 5 + j * 3 + (k / 3);
                    int sum = i + j + k;
                    if(money == 100 && sum == 100){
                        System.out.println("公鸡:" + i + " 钱：" + i * 5);
                        System.out.println("母鸡:" + j + " 钱：" + j * 3);
                        System.out.println("小鸡:" + k + " 钱：" + k / 3);
                    }
                }
            }
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> num = new ArrayList<Integer>(n);
        for (int i = 0; i < n; i++) {
            num.add(scanner.nextInt());
        }

        Solution solution = new Solution();
        System.out.println(solution.maxIncreasingSubarrays(num));
    }
}

class Solution {
    public int maxIncreasingSubarrays(List<Integer> nums) {
        int ans = 0;
        int preCnt = 0;
        int cnt = 0;
        for (int i = 0; i < nums.size(); i++) {
            cnt++;
            if (i == nums.size() - 1 || nums.get(i) >= nums.get(i + 1)) {
                ans = Math.max(ans, Math.max(cnt / 2, Math.min(preCnt, cnt)));
                preCnt = cnt;
                cnt = 0;
            }
        }
        return ans;
    }
}